# CMake 版本限制
# cmake_minimum_required(VERSION 3.20)

# 编译策略
# cmake_policy(SET CMP0091 NEW)

# 工程定义
# project(tutorial)

# C++标准
# set(CMAKE_CXX_STANDARD 11)
# set(CMAKE_CXX_STANDARD_REQUIRED True)

# 设置输出文件附加标识
# if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
#     set(CMAKE_DEBUG_POSTFIX "d")
# endif()

# 设置编译附加命令
# set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /D_DEBUG")
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG")

# 预定义宏
add_compile_definitions(_USREXE)

# 查找程序文件
aux_source_directory(. SOURCE_FILE)

# 生成可执行文件
add_executable(tutorial ${SOURCE_FILE})

# 引用动态库
target_include_directories(tutorial PUBLIC ${PROJECT_BINARY_DIR}/bin/include)
target_link_libraries(tutorial PUBLIC ASL)

# 设置MSVC编译配置
set_property(TARGET tutorial PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")